package com.clinic.entity.type;

public enum SortOrder {
	
	NAME("name", "name"),
	DOB("dob", "date of birth"),
	EXPIRE_DATE("expireDate", "expireDate"),
	MINIMUM("minimum" , "minimum drug amount");
	
	private String column;
	private String label;
	
	private SortOrder(String column, String label) {
		this.column = column;
		this.label = label;
	}
	
	public static SortOrder getValue(String col) {
		for (SortOrder sort : SortOrder.values()) {
			if (sort.getColumn().equals(col)) {
				return sort;
			}
		}
		return null;
	}
	
	public String getColumn() {
		return this.column;
	}
	
	public String getLabel() {
		return this.label;
	}

}
